package file;

import java.io.File;
import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException {
        //create();
        delete();
    }
    public static void create() throws IOException {
        for (int i = 1; i <= 10; i++){
            String fileName = "test"+i+".txt";
            File file = new File(fileName);
            file.createNewFile();
            }
        }

    public static void delete(){
        for (int i = 1; i <= 10; i++){
           String fileName = "test"+i+".txt";
           File file = new File(fileName);
            if (file.exists()){
                file.delete();
            }
        }
    }


}
